package entities;
import java.io.Serializable;

/**
 *@author Juan Alapin - 324507516
 *@author Giora Yaffe - 036551281
 *@author Shachar Gritzman - 300174026
 *@author Nir Porat - 021515580
*/

public class EstimationReport implements Serializable  {
	
	private static final long serialVersionUID = 1L;
	private int proID;
	private String sysChange;
	private String changeDesc;
	private String result;
	private String limitations;
	private String hazards;
	private int estimatedTime;
	private int Mem1ReadOk;
	private int Mem2ReadOk;
	
	/**
	 * Constructor
	 * @param processID - Process ID
	 */
	public EstimationReport(int processID) {
		this.proID = processID;
	}
	
	/**
	 * Constructor
	 * @param processID - Process ID.
	 * @param system - The System That The Process Is About.
	 * @param change - Change Description.
	 * @param res - Report Result.
	 * @param limit - limitations for the process changes.
	 * @param hazard - risks taking from a process changes.
	 * @param estTime - Estimated time for process.
	 */
	public EstimationReport(int processID, String system,String change,String res,String limit,String hazard,int estTime) {
		this.proID = processID;
		this.sysChange = new String(system);
		this.changeDesc = new String(change);
		this.result = new String(res);
		this.limitations=new String(limit);
		this.hazards = new String(hazard);
		setEstTime(estTime);
		this.Mem1ReadOk=0;
		this.Mem2ReadOk=0;
	}
	
	/**
	 * Constructor
	 * @param processID - Process ID.
	 * @param system - The System That The Process Is About.
	 * @param change - Change Description.
	 * @param res - Report Result.
	 * @param limit - limitations for the process changes.
	 * @param hazard - risks taking from a process changes.
	 * @param estTime - Estimated time for process.
	 * @param Mem1 - Committee member number 1.
	 * @param Mem2 - Committee member number 2.
	 */
	public EstimationReport(int processID, String system,String change,String res,String limit,String hazard,int estTime,int Mem1,int Mem2) {
		this.proID = processID;
		this.sysChange = new String(system);
		this.changeDesc = new String(change);
		this.result = new String(res);
		this.limitations=new String(limit);
		this.hazards = new String(hazard);
		setEstTime(estTime);
		this.Mem1ReadOk=Mem1;
		this.Mem2ReadOk=Mem2;
	}
	
	public int getReportId(){
		return(this.proID);
	}
	
	public String getSystem(){
		return(this.sysChange);
	}
	
	public String getChangeDesc(){
		return(this.changeDesc);
	}
	
	public String getResult(){
		return(this.result);
	}
	
	public String getLimitataions(){
		return(this.limitations);
	}
	
	public String getHazards(){
		return(this.hazards);
	}
	
	public int getEstTime(){
		return(this.estimatedTime);
	}
	
	public void setEstTime(int time){
		if(time>0) this.estimatedTime=time;
		else	this.estimatedTime=0;
	}
	public int getMem1ReadOk(){
		return(this.Mem1ReadOk);
	}
	public void setMem1ReadOk(int Mem1){
		if((Mem1==1)||(Mem1==0)) this.Mem1ReadOk=Mem1;
		else Mem1ReadOk=0;
	}
	public int getMem2ReadOk(){
		return(this.Mem2ReadOk);
	}
	public void setMem2ReadOk(int Mem2){
		if((Mem2==1)||(Mem2==0)) this.Mem2ReadOk=Mem2;
		else Mem2ReadOk=0;
	}
	
}

